package mil.af.amc.adpetracker.service;

import mil.af.amc.adpetracker.dao.RankDao;
import mil.af.amc.adpetracker.model.Rank;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Object to represent a military rank
 *
 * @author TSgt Jason Ferguson
 */
@Service("rankService")
public class RankServiceImpl implements RankService {

    private RankDao rankDao;

    @Autowired
    public void setRankDao(RankDao rankDao) {
        this.rankDao = rankDao;
    }

    public List<Rank> getAll() {
        return rankDao.getAll();
    }

    public Rank getById(int id) {
        return rankDao.getById(id);
    }
}
